feat: create transaction refinement#168
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
5 tasks
537d7e5 to
6a3cdfb
Compare
Co-authored-by: Sergey Zhuravlev <zhuravlev1337@gmail.com>
Co-authored-by: Sergey Zhuravlev <zhuravlev1337@gmail.com>
2736b27 to
d342e03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refines
host_create_transactionand the product-account signerCleans up the create-transaction API and makes
getProductAccountSigneractually produce a usable PAPI signer.Protocol changes
host_create_transaction/host_create_transaction_with_legacy_account:signerfield. The separateaccountIdparameter is gone.contextblock (runtime metadata, token symbol/decimals, best block height) is dropped — the signer is online and reads those from the chain.VersionedTxPayloadenvelope is gone — passTxPayloadV1<Signer>directly.signeris required (wasOption<str>).Before:
After:
product-sdkgetProductAccountSigner(account)now returns aPolkadotSignerwhosesignTxroutes throughhost_create_transactionand returns a fully signed extrinsic. Previously it returned a detached signature viahost_sign_payloadand made the caller assemble the extrinsic.New top-level
accountsexport — a ready-to-use provider built on the default sandbox transport, so products that don't need a custom transport can skipcreateAccountsProvider():Signer.createTransactionpayload shape changes to match the newTxPayloadV1(noversion, nocontext, typedsigner).Exports
ProductAccountIdandLegacyAccounttypes.New runtime dependency:
@polkadot-api/substrate-bindings(used to read the extrinsic version from metadata).host-pappUserSessiongainscreateTransaction(payload). The Host can now delegate product-account transaction signing to the paired Polkadot Mobile app over SSO via the newCreateTransactionRequest/CreateTransactionResponsemessage pair. Legacy-account signing stays Host-local.Compatibility
No shim.
host_create_transactionhad no production consumers andhost_create_transaction_with_legacy_accountis only reachable viaproduct-sdk, which is bumped in lockstep.